//
//  WZRemindCell.m
//  WZEfengAndEtong
//
//  Created by wanzhao on 16/6/14.
//  Copyright © 2016年 wanzhao. All rights reserved.
//

#import "WZRemindCell.h"
#import "WZDetailSchedule.h"

@interface WZRemindCell ()

@end

@implementation WZRemindCell

static NSString * const remindCell = @"remindCell";

- (void)awakeFromNib {
    // Initialization code
    
    [super awakeFromNib];
    
}


+ (instancetype)remindCellWithTableView:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath {
    
    WZRemindCell *cell = [tableView dequeueReusableCellWithIdentifier:remindCell];
    
    switch (indexPath.section) {
        case 0:
            // 设置0组
            [cell setupRowWithIndexPath:indexPath];
            break;
            
        case 1:
            cell.remindTime.text = @"自定义";
            cell.remindStatus.hidden = YES;
            cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
            break;
            
        default:
            break;
    }
    return cell;
}


- (void)setupRowWithIndexPath:(NSIndexPath *)indexPath {
    
    switch (indexPath.row) {
        case 0:
            self.remindTime.text = @"不提前提醒";
            break;
            
        case 1:
            
            self.remindTime.text = @"提前5分钟";
            break;
            
        case 2:
            
            self.remindTime.text= @"提前15分钟";
            self.selected = YES;
            break;
            
        case 3:
            
            self.remindTime.text = @"提前30分钟";
            break;
            
        case 4:
            
            self.remindTime.text = @"提前1小时";
            break;
            
        default:
            break;
    }
}

- (void)setDetailSchedule:(WZDetailSchedule *)detailSchedule {
    
    _detailSchedule = detailSchedule;
    
//    if ([detailSchedule.alertFlag isEqualToString:@"1"]) {
//        
//        self.remindStatus.image = [UIImage imageNamed:@"selected"];
//        
//    } else if ([self.detailSchedule.beforeLength isEqualToString:@"5"]) {
//        
//        self.remindStatus.highlighted = YES;
//    } else if ([self.detailSchedule.beforeLength isEqualToString:@"15"]) {
//        
//        self.remindStatus.highlighted = YES;
//    } else if ([self.detailSchedule.beforeLength isEqualToString:@"30"]) {
//        
//        self.remindStatus.highlighted = YES;
//        
//    }
}



@end
